﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Ultrant Media Server点播测试页面</title>

		<style type="text/css">
			body { background-color: #fff; padding: 0 20px; color:#000; font: 13px/18px Arial, sans-serif; }
			a { color: #360; }
			h3 { padding-top: 20px; font: 18px/18px Arial, sans-serif; color: red;}
			ol { margin:5px 0 15px 16px; padding:0; list-style-type:square; }
			.CtrlBtn { border-radius: 3px; border: solid; border-width: 2px; background: #9a9; width: 80px; height: 30px;}
		</style>
        <link href="css/bootstrap.min.css" rel="stylesheet">

	</head>
	<body>
		<table>
			<thead></thead>
			<tbody>
				<tr>
					<td>
						<h3><strong>播放列表示例：</strong></h3>
						<div id="medialist"><b>您需要安装最新版的Adobe Flash Player才能浏览本页内容!</b></div>
					</td>
				</tr>
				<tr>
					<td>
						<input class="btn btn-primary btn-large" id="playBtn" type="button" value="开始">
						<input class="btn btn-primary btn-large" id="prevBtn" type="button" value="上一个">
						<input class="btn btn-primary btn-large" id="nextBtn" type="button" value="下一个">
						<input class="btn btn-primary btn-large" id="stopBtn" type="button" value="停止">
					</td>
				</tr>
			</tbody>
		</table>
		<div></div>

		<!-- START OF THE PLAYER EMBEDDING TO COPY-PASTE -->

		<script type="text/javascript" src="js/jquery-1.7.1.js"></script>
		<script type="text/javascript" src="js/umsplayer.js"></script>
		<script type="text/javascript">
			var myPlayerWithPlaylist = umsplayer("medialist").setup({
				flashplayer : "player/umsplayer.swf",
				width : 800,
				height : 400,
				backcolor : "#000000",
				stretching : "uniform",
				playlist : "right",
				playlistfile : "rss/playlist.rss",
				item : 0,
				autoStart : false,
				repeat : "always",
				volume : 100,
				controlbar : "over",
				viral : {onpause:true, allowmenu:true},
				skin : "skins/glow.zip"
			});
			myPlayerWithPlaylist.play();
			var elem = $("#playBtn")[0];

			myPlayerWithPlaylist.onPlay(function(){
				elem.value = "暂停";
			});
			myPlayerWithPlaylist.onPause(function(){
				elem.value = "开始";
			});
			myPlayerWithPlaylist.onIdle(function(){
				elem.value = "开始";
			});
			
			$("body").on("click", "#playBtn", function(){
				myPlayerWithPlaylist.play();
			});
			$("body").on("click", "#prevBtn", function(){
				myPlayerWithPlaylist.playlistPrev();
			});
			$("body").on("click", "#nextBtn", function(){
				myPlayerWithPlaylist.playlistNext();
			});
			$("body").on("click", "#stopBtn", function(){
				myPlayerWithPlaylist.stop();
			});
		</script> 

		<!-- END OF THE PLAYER EMBEDDING -->
	</body>
</html>